﻿#include "tradenetworkaccessmanager.h"

const static QString TRADE_BASE_URL = BASE_URL+"trade/";
const static QString TRADE_GET_QR_CODE = TRADE_BASE_URL+"getQrCode";
const static QString TRADE_QUERY_USER_INFO = TRADE_BASE_URL+"queryUserInfo";
TradeNetworkAccessManager::TradeNetworkAccessManager(QObject *parent) : BaseNetworkAccessManager(parent)
{

}

void TradeNetworkAccessManager::getQrCode(QString username, int day, QString totalAmount){
    QByteArray data;
    data.append("username="+username+"&");
    data.append("day="+QString("%1").arg(day)+"&");
    data.append("totalAmount="+totalAmount);

    doPost(TRADE_GET_QR_CODE, data);
}

void TradeNetworkAccessManager::queryUserInfo(QString username){
    QByteArray data;
    data.append("username="+username);

    doPost(TRADE_QUERY_USER_INFO, data);
}
